﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ThreeByte.ActiveDeck.AddIn.Content.UserResponse;
using ThreeByte.ActiveDeck.Data.UserResponse;

namespace ThreeByte.ActiveDeck.Content
{
    /// <summary>
    /// Interaction logic for ShortAnswerFeedbackControl.xaml
    /// </summary>
    public partial class ShortAnswerFeedbackControl : UserControl
    {
        private ShortAnswerUserData Data;

        public ShortAnswerFeedbackControl(ShortAnswerUserData qData) {
            InitializeComponent();
            Data = qData;
            AnswerTextBlock.Text = qData.TopAnswer;
            //Data.Updated += new EventHandler(Data_Updated);
        }

        void Data_Updated(object sender, EventArgs e) {
            //RefreshAnswers();
        }

        //private static int instance = 0;
        //public void RefreshAnswers() {

        //    //PromptTextBlock.Text = Data.Question;

        //    ContentRoot.Children.Clear();

        //    //if(questionSet == 1) {
        //    //int[] answerCounts = new int[4] { ++instance % 4, 2, 1, 0 };
        //    //string[] answers = new string[4] { "Red", "Blue", "Yellow", "Green" };

        //    //int totalCount = 4;
        //    for(int i = 0; i < Data.Answers.Count; i++) {
        //        MultipleChoiceResultElement newElement = new MultipleChoiceResultElement();
        //        MultipleChoiceAnswerData ans = Data.Answers[i];
        //        //newElement.Label = ans.Answer;// answers[i];
        //        newElement.Percent = ans.Percent;
        //        newElement.SetValue(Grid.RowProperty, (int)i);
        //        ContentRoot.Children.Add(newElement);
        //    }

        //}



    }
}
